KFbxLayerElement Class Reference

#include <kfbxlayer.h>
Inheritance diagram for KFbxLayerElement:
Inheritance graph
[legend]

List of all members.


Detailed Description

KFbxLayerElement is the base class for Layer Elements.

It describes how a Layer Element is mapped to a geometry surface and how the mapping information is arranged in memory.

Definition at line 77 of file kfbxlayer.h.


Public Types

enum   ELayerElementType
  Layer Element type identifier. More...
enum   EMappingMode
  Determines how the element is mapped to a surface. More...
enum   EReferenceMode
  Determines how the mapping information is stored in the array of coordinates. More...

Public Member Functions

void  SetMappingMode (EMappingMode pMappingMode)
  Sets the Mapping Mode.
void  SetReferenceMode (EReferenceMode pReferenceMode)
  Sets the Reference Mode.
EMappingMode  GetMappingMode () const
  Returns the Mapping Mode.
EReferenceMode  GetReferenceMode () const
  Returns the Reference Mode.
void  SetName (const char *pName)
  Sets the name of this object.
const char *  GetName () const
  Returns the name of this object.
bool  operator== (const KFbxLayerElement &pOther) const
  Equivalence operator.
KFbxLayerElement operator= (KFbxLayerElement const &pOther)
  Assignment operator.
void  Destroy ()
  Removes this layer element from its owner and delete it.
virtual bool  Clear ()
  Clears all the data from this layer element.

Static Public Attributes

static const int  LAYERELEMENT_TYPE_TEXTURE_START_INDEX = int(eDIFFUSE_TEXTURES)
  The start index of texture type layer elements.
static const int  LAYERELEMENT_TYPE_TEXTURE_END_INDEX = int(eDISPLACEMENT_TEXTURES)
  The end index of texture type layer elements.
static const int  LAYERELEMENT_TYPE_TEXTURE_COUNT = int(eLAST_ELEMENT_TYPE - eDIFFUSE_TEXTURES)
  The count of texture type layer elements.
static const int  LAYERELEMENT_TYPE_NON_TEXTURE_START_INDEX = int(eNORMAL)
  The start index of non-texture type layer elements.
static const int  LAYERELEMENT_TYPE_NON_TEXTURE_END_INDEX = int(eVISIBILITY)
  The end index of non-texture type layer elements.
static const int  LAYERELEMENT_TYPE_NON_TEXTURE_COUNT = int(eDIFFUSE_TEXTURES - eUNDEFINED - 1)
  The count of non-texture type layer elements.
static const char *  TEXTURE_NAMES []
  Array of names of texture type layer elements.
static const char *  TEXTURE_UV_NAMES []
  Array of names of UV layer elements.
static const char *  NON_TEXTURE_NAMES []
  Array of names of non-texture type layer elements.
static KFbxDataType  TEXTURE_TYPES []
  Array of texture types.
static const char *  TEXTURE_CHANNEL_NAMES []
  Array of texture channels.

Member Enumeration Documentation

Layer Element type identifier.

Definition at line 114 of file kfbxlayer.h.

Determines how the element is mapped to a surface.

  • eNONE The mapping is undetermined.
  • eBY_CONTROL_POINT There will be one mapping coordinate for each surface control point/vertex.
  • eBY_POLYGON_VERTEX There will be one mapping coordinate for each vertex, for every polygon of which it is a part. This means that a vertex will have as many mapping coordinates as polygons of which it is a part.
  • eBY_POLYGON There can be only one mapping coordinate for the whole polygon.
  • eBY_EDGE There will be one mapping coordinate for each unique edge in the mesh. This is meant to be used with smoothing layer elements.
  • eALL_SAME There can be only one mapping coordinate for the whole surface.

Definition at line 207 of file kfbxlayer.h.

Determines how the mapping information is stored in the array of coordinates.

  • eDIRECT This indicates that the mapping information for the n'th element is found in the n'th place of KFbxLayerElementTemplate::mDirectArray.
  • eINDEX, This symbol is kept for backward compatibility with FBX v5.0 files. In FBX v6.0 and higher, this symbol is replaced with eINDEX_TO_DIRECT.
  • eINDEX_TO_DIRECT This indicates that the KFbxLayerElementTemplate::mIndexArray contains, for the n'th element, an index in the KFbxLayerElementTemplate::mDirectArray array of mapping elements. eINDEX_TO_DIRECT is usually useful for storing eBY_POLYGON_VERTEX mapping mode elements coordinates. Since the same coordinates are usually repeated many times, this saves spaces by storing the coordinate only one time and then referring to them with an index. Materials and Textures are also referenced with this mode and the actual Material/Texture can be accessed via the KFbxLayerElementTemplate::mDirectArray

Definition at line 230 of file kfbxlayer.h.


Member Function Documentation

void SetMappingMode ( EMappingMode  pMappingMode  )  [inline]

Sets the Mapping Mode.

Parameters:
pMappingMode  Specifies the way that layer element is mapped to a surface.

Definition at line 241 of file kfbxlayer.h.

void SetReferenceMode ( EReferenceMode  pReferenceMode  )  [inline]

Sets the Reference Mode.

Parameters:
pReferenceMode  Specifies the reference mode.

Reimplemented in KFbxLayerElementSmoothing, and KFbxLayerElementCrease.

Definition at line 246 of file kfbxlayer.h.

EMappingMode GetMappingMode (  )  const [inline]

Returns the Mapping Mode.

Returns:
The current Mapping Mode.

Definition at line 251 of file kfbxlayer.h.

EReferenceMode GetReferenceMode (  )  const [inline]

Returns the Reference Mode.

Returns:
The current Reference Mode.

Definition at line 256 of file kfbxlayer.h.

Referenced by KFbxLayerElementUserData::operator=(), KFbxLayerElementTemplate< KFbxSurfaceMaterial * >::operator=(), and KFbxLayerElementTemplate< KFbxSurfaceMaterial * >::operator==().

void SetName ( const char *  pName  )  [inline]

Sets the name of this object.

Parameters:
pName  Specifies the name of this LayerElement object.

Definition at line 261 of file kfbxlayer.h.

const char* GetName (  )  const [inline]

Returns the name of this object.

Returns:
The current name of this LayerElement object.

Definition at line 266 of file kfbxlayer.h.

bool operator== ( const KFbxLayerElement pOther  )  const [inline]

Equivalence operator.

Parameters:
pOther  Layer element to be compared.
Returns:
True if equal, false otherwise.

Definition at line 272 of file kfbxlayer.h.

Referenced by KFbxLayerElementTemplate< KFbxSurfaceMaterial * >::operator==().

KFbxLayerElement& operator= ( KFbxLayerElement const &  pOther  )  [inline]

Assignment operator.

Parameters:
pOther  Layer element assigned to this one.
Returns:
This layer element after assignment.

Definition at line 283 of file kfbxlayer.h.

void Destroy (  ) 

Removes this layer element from its owner and delete it.

virtual bool Clear (  )  [inline, virtual]

Member Data Documentation

const int LAYERELEMENT_TYPE_TEXTURE_START_INDEX = int(eDIFFUSE_TEXTURES) [static]

The start index of texture type layer elements.

Definition at line 163 of file kfbxlayer.h.

const int LAYERELEMENT_TYPE_TEXTURE_END_INDEX = int(eDISPLACEMENT_TEXTURES) [static]

The end index of texture type layer elements.

Definition at line 166 of file kfbxlayer.h.

const int LAYERELEMENT_TYPE_TEXTURE_COUNT = int(eLAST_ELEMENT_TYPE - eDIFFUSE_TEXTURES) [static]

The count of texture type layer elements.

Definition at line 169 of file kfbxlayer.h.

const int LAYERELEMENT_TYPE_NON_TEXTURE_START_INDEX = int(eNORMAL) [static]

The start index of non-texture type layer elements.

Definition at line 172 of file kfbxlayer.h.

const int LAYERELEMENT_TYPE_NON_TEXTURE_END_INDEX = int(eVISIBILITY) [static]

The end index of non-texture type layer elements.

Definition at line 175 of file kfbxlayer.h.

const int LAYERELEMENT_TYPE_NON_TEXTURE_COUNT = int(eDIFFUSE_TEXTURES - eUNDEFINED - 1) [static]

The count of non-texture type layer elements.

Definition at line 178 of file kfbxlayer.h.

const char* TEXTURE_NAMES[] [static]

Array of names of texture type layer elements.

Definition at line 183 of file kfbxlayer.h.

const char* TEXTURE_UV_NAMES[] [static]

Array of names of UV layer elements.

Definition at line 186 of file kfbxlayer.h.

const char* NON_TEXTURE_NAMES[] [static]

Array of names of non-texture type layer elements.

Definition at line 189 of file kfbxlayer.h.

Array of texture types.

Definition at line 192 of file kfbxlayer.h.

const char* TEXTURE_CHANNEL_NAMES[] [static]

Array of texture channels.

Definition at line 195 of file kfbxlayer.h.

KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement
KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement